import { createApp } from 'vue';
import App from './App.vue';
import router from '@/router';
import { setupStore } from '@/store';
import { setupDirective } from '@/directive';

import '@/permission';


import ElementPlus from 'element-plus/es/index'
import 'element-plus/dist/index.css'
import FormCreate from '@form-create/element-ui'

//阿里巴巴矢量图标库
//import "//at.alicdn.com/t/c/font_4430202_sj40wxz14l.js"

// 本地SVG图标
import 'virtual:svg-icons-register';
import vue3TreeOrg from 'vue3-tree-org';
import "vue3-tree-org/lib/vue3-tree-org.css";
// 国际化
import i18n from '@/lang/index';

// 样式
import "element-plus/theme-chalk/el-notification.css";
import 'element-plus/theme-chalk/dark/css-vars.css';
import '@/styles/index.scss';
import 'uno.css';

import api from '@/api/api.ts';


import Particles from 'particles.vue3';

const app = createApp(App);

app.provide('$base', api);

// 全局注册 自定义指令(directive)
setupDirective(app);
// 全局注册 状态管理(store)
setupStore(app);
app.use(vue3TreeOrg)

app.use(ElementPlus)
app.use(FormCreate)

app.use(router).use(i18n).use(Particles).mount('#app');
